#include <iostream>
using namespace std;
class Complex
{
	public:
		double real;
		double image;
	Complex(double r = 0.0,double i = 0.0):real(r),image(i){}
	Complex opposite()
	{
		return {-real,-image};
	}
	void print()
	{
		cout<<real<<image<<endl;
	}
	friend Complex operator+(const Complex & c1,const Complex & c2)
	{
		return Complex(c1.real+c2.real,c1.image+c2.image);
	}
};
int main()
{
	int r1=5,r2=4,i1=1,i2=2;
	Complex c1=(r1,i1);
	Complex c2=(r2,i2);
	Complex sum= c1 + c2 ;
	sum.print();
	Complex summ= c1 + c2.opposite() ;
	summ.print();
	c2.print();
}